<template>
  <div class="list">
    <!-- 自定义事件，接受子组件传递过来的数据 -->
    <listLeft @itemId="itemId"></listLeft>
    <listRight :id="cid"></listRight>
  </div>
</template>

<script>
import listLeft from './listLeft/listLeft'
import listRight from './listRight/listRight'
export default {
  name:'List',
  data() {
    return {
      cid:''
    }
  },
  components:{listLeft,listRight},
  methods:{
    itemId(id){
      this.cid=id
    }
  }
}
</script>

<style>
.list{
  display: flex;
}
</style>